namespace ICommonLibrary.Collection {

    public interface ITreeVisitor<T> {

        /// <summary>
        /// Start visiting the given node.
        /// </summary>
        /// <param name="treeNode"></param>
        /// <returns>true to visit the children of the given node, false otherwise</returns>
        bool VisitEnter(T treeNode);

        /// <summary>
        /// </summary>
        /// <param name="treeNode"></param>
        /// <returns>true to visit the next sibling of the given node, false otherwise</returns>
        bool VisitLeave(T treeNode);
        
    }
}